package com.xhlj.utils;

public enum OssResourcePath {

    // 定义一下资源的文件夹
    PostResource("postResource/"),

    ImageResource("imageResource/");


    private final String path;

    OssResourcePath(String path) {
        this.path = path;
    }

    public String getPath() {
        return path;
    }

    public static OssResourcePath fromPath(String path) {
        for (OssResourcePath resourcePath : OssResourcePath.values()) {
            if (resourcePath.getPath().equals(path)) {
                return resourcePath;
            }
        }
        return null;
    }

}